/*
 * ll.h
 *
 *  Created on: 2015-04-02
 *      Author: root
 */

#ifndef LL_H_
#define LL_H_

#include "stddef.h"

#endif /* LL_H_ */










/* Type definitions */
typedef struct {
	char itemCode; 	/* stores a number describing the element */
	//char stage; 	/* 0: part is built, 1: part not built, 2: part is shipped */
} element;

typedef struct link{
	element		e;
	struct link *next;
} link;

link *head;			/* The ptr to the head of the queue */
link *tail;			/* The ptr to the tail of the queue */
link *newLink;		/* A ptr to a link aggregate data type (struct) */
link *rtnLink;		/* same as the above */
element eTest;		/* A variable to hold the aggregate data type known as element */

void	initLink	(link **newLink);
void 	setup		(link **h, link **t);
void 	clearQueue	(link **h, link **t);
void 	enqueue		(link **h, link **t, link **nL);
void 	dequeue		(link **h, link **t, link **deQueuedLink);
element firstValue	(link **h);
char 	isEmpty		(link **h);
int 	size		(link **h, link **t);
